package com.ruoyi.domain;

import lombok.Data;

@Data
public class WsResult {
    //消息代码
    private Integer code;
    //消息载体
    private Object data;
    //消息类别
    private String type;

    private WsResult(Builder builder) {
        this.code = builder.code;
        this.data = builder.data;
        this.type = builder.type;
    }

    public static class Builder {
        private Integer code;
        private Object data;
        private String type;

        public Builder code(Integer code) {
            this.code = code;
            return this;
        }

        public Builder data(Object data) {
            this.data = data;
            return this;
        }

        public Builder type(String type) {
            this.type = type;
            return this;
        }

        public WsResult build() {
            return new WsResult(this);
        }
    }

}
